import request from "@/utils/request";

//查询纸张领用单列表
export function getUseInfoList(params) {
  return request({
    url: "/mes/use/info/list",
    method: "get",
    params,
  });
}
// 新增纸张领用单
export function addUseInfo(data) {
  return request({
    url: "/mes/use/info",
    method: "post",
    data,
  });
}
// 修改纸张领用单
export function editUseInfo(data) {
  return request({
    url: "/mes/use/info",
    method: "put",
    data,
  });
}
// 获取纸张领用单详细信息
export function getUseInfo(id, params) {
  return request({
    url: `/mes/use/info/${id}`,
    method: "get",
    params,
  });
}

//机台库存查询页面 累计领用数量穿透
export function getUseDetail(data) {
  return request({
    url: `/mes/use/info/getUseDetail`,
    method: "get",
    params:data,
  });
}

// 删除纸张领用单
export function delUseInfo(id) {
  return request({
    url: `/mes/use/info/${id}`,
    method: "DELETE",
  });
}

// 导出纸张领用单列表
export function exportUseList(data) {
  return request({
    url: `/mes/use/info/export`,
    method: "post",
    data,
    responseType: "blob",
  });
}


// 导出纸张领用明细单列表
export function exportDetail(data) {
  return request({
    url: `/mes/use/info/exportDetail`,
    method: "post",
    data,
    responseType: "blob",
  });
}
// 领用单明细查询
export function getUseDetaillist(data) {
  return request({
    url: `/mes/use/info/Detail`,
    method: "post",
    data,
  });
}
// 裁切组纸张查询
export function cuttingGrouplist(params) {
  return request({
    url: `/mes/paper/cuttingGrouplist`,
    method: "get",
    params,
  });
}
